<?php
//oicvalidator.php
include_once("config/config.inc.php");
$user = $_POST["usr"];
$pwd = $_POST["pwd"];
$sql = " select username from users where username='$user' 
		and userpass='$pwd'  ";
$res = mysql_query($sql) or die($sql);
if(mysql_num_rows($res)) {
	list($uid)=mysql_fetch_row($res);
	echo $uid ;
}else{
	echo 0;
}
?>